package com.ioc.common.enums;

/**
 * 交易订单规则配置：
 * 新增一条交易规则，将service 的name 配置到此处；
 *
 * @author ONEC
 */

public enum ServiceTradeEnum {

    MERCHANT_AMOUNT_LIMIT_SERVICE("商户交易金额限制"),
    CHANNEL_NUM_NOT_FIND("交易订单不存在"),

    ;

    private String message;

    ServiceTradeEnum(String message) {
        this.message = message;
    }

    /**
     * 判断是否包含在枚举里边：
     *
     * @param serviceName
     * @return boolean
     */
    public static boolean isInclude(String serviceName) {
        for (ServiceTradeEnum serviceTypeEnum : ServiceTradeEnum.values()) {
            if (serviceTypeEnum.name().equals(serviceName)) {
                return true;
            }
        }
        return false;
    }

    public String getMessage() {
        return message;
    }
}
